import request from '@/utils/request'

const api_name = '/edu/video'

export default {
    // 添加课时
    addVideo(video) {
        return request({
            url: `${api_name}`,
            method: 'post',
            data: video
        })
    },

    // 修改课时
    updateVideoById(video) {
        return request({
            url: `${api_name}`,
            method: 'put',
            data: video
        })
    },

    // 根据课时id，获取课时信息
    getVideoById(videoId) {
        return request({
            url: `${api_name}/${videoId}`,
            method: 'get'
        })
    },
    //根据id删除课时
    delVideoById(id) {
        return request({
            url: `${api_name}/${id}`,
            method: 'delete'
        })
    },

}